# Contributor: Patrick Useldinger <alpine@usel.me>
# Maintainer: Patrick Useldinger <alpine@usel.me>
pkgname=ssl-cert-check
pkgver=4.14
pkgrel=0
pkgdesc="SSL Certification Expiration Checker"
subpackages="$pkgname-doc"
url="https://github.com/Matty9191/ssl-cert-check"
arch="noarch"
license="GPL-2.0-or-later"
_pkgver="967b93707f53cfdfefd61e074f18348f1f82bab9"
builddir="$srcdir/$pkgname-$_pkgver"
source="$pkgname-$pkgver.tar.gz::https://github.com/Matty9191/ssl-cert-check/archive/$_pkgver.tar.gz
	no-bash.patch
	use-slash-tmp.patch
	keyStore.p12
	"

check() {
	./ssl-cert-check -b -c "$srcdir/keyStore.p12" -k "password" | grep " Jun 16, 2034 "
}

package() {
	install -Dm755 ssl-cert-check -t "$pkgdir"/usr/bin/
	install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
	install -Dm644 README.md -t "$pkgdir"/usr/share/doc/$pkgname/
}

sha512sums="
28abefa64fa446786ce665023c2b8254ef0769e3fda30e6dede2e14e8364ac37c7973970388634a15946d533df70d91cab60b8e0c5d8638d824a0483f2b8b52a  ssl-cert-check-4.14.tar.gz
a0c40b6d6ada678838333ebc410aad0ef8a73f95b383b0f82ce54c76001ce0f5a7d8037987dd8ccc322cc12cb3c27fdb3b3cf3acb037decc120de3020f25baff  no-bash.patch
79b4857ba6c52ba4fdf7ef562efa27ff06b67ae687f65ddd9bc59906fd9a21c14223b368093eb0454ba365047810ff3d57f55d12227abc1b69afc94ee5649dff  use-slash-tmp.patch
02fb5bfa73bac317492ed79c0dabae80d2153d42f2a2bef764792f8622563fe1ced5ab813816c62d55a11e2072e51baf2569f232fc1c8710f91c7709c51fef28  keyStore.p12
"
